<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>mysql-json-view</title>

</head>
<body>

<div id="app">
  <div v-for="emp in list">
      {{emp.name}}

  </div>
</div>
</body>
<!--
   axios
      ajax  异步JavaScript and  xml (数据格式)---json

         <entity  name ="employee">
             <name type="string">Matty</name>
             <age type="int">23</age>
         </entity>
         ---  xpath
      promise -- es6



-->

<script src="../../lib/vue.global.js"></script>
<script src="../../lib/axios.js"></script>
<script>

    Vue.createApp({
        data(){
             return {
                  list:[]
             }
        },
        mounted(){

             var _this = this;

            axios({
                url:'../../data/staff2.json',
                method:'get',
                dataType:'json'
            }).then(function (res){ // response

                console.log(res.data);

                _this.list = res.data;
            })
        }

    }).mount('#app')


</script>


</html>